Imports System.Collections
Imports SchemaCodeGen

Partial Class pages_DriverTypes_default : Inherits CPage


#Region "Data"
	Public ReadOnly Property [DriverTypes]() As CDriverTypeList
        Get
			Return CDriverType.Cache
		End Get
    End Property
#End Region

#Region "Event Handlers - Page "
    Protected Overrides Sub PageInit()
		'Populate Dropdowns


		'Search state (from querystring)
		'Display Results
		ctrlDriverTypes.Display(Me.DriverTypes)
	End Sub
#End Region

#Region "Event Handlers - UserControl"
	Private Sub ctrl_ExportClick() Handles ctrlDriverTypes.ExportClick
        DriverTypes.ExportToCsv(Response, "DriverTypes.csv")
    End Sub
    Private Sub ctrl_ResortClick(ByVal sortBy As String, ByVal descending As Boolean, ByVal pageNumber As Integer) Handles ctrlDriverTypes.ResortClick
		Response.Redirect(CSitemap.DriverTypes(New CPagingInfo(0, pageNumber - 1, sortBy, descending)))
	End Sub
#End Region

End Class
